<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <base href="${request.contextPath}/"/>
    <meta charset="UTF-8">
    <meta name="Keywords" content="">
    <meta name="Description" content="">
    <meta name="format-detection" content="telephone=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,minimum-scale=1.0">
    <title>兑换记录</title>
    <link href="Content/wechat/css/reset.css" rel="stylesheet" type="text/css">
    <!--签到-->
    <link href="Content/wechat/css/jiFengShangCheng_DHJL.css" rel="stylesheet" type="text/css">

    <!--banner-->
    <link href="Content/wechat/css/amazeui.min.css" rel="stylesheet" type="text/css">
    <script src="Content/wechat/js/jquery.min.js"></script>
    <!--页码-->
    <link href="Content/wechat/css/myPagination.css" rel="stylesheet" type="text/css">
    <!--字体缩放-->
    <script src="Content/wechat/js/ziti.js"></script>
    <!--end 字体缩放-->
    <!--页码js-->
    <script src="Content/wechat/js/myPagination.js"></script>
</head>
<body>

<div class="jf_list">
    <div class="jf_list_box" id="liuYan_box">



<!--        <div class='jf_list_box_01 clearfix'>-->
<!--            <div class="img_l">-->
<!--                <img src="Content/wechat/images/tx11.jpg">-->
<!--            </div>-->
<!--            <div class="p_r">-->
<!--                <p style="color: #555">林森的宝贝</p>-->
<!--                <h3>10元现金红包X2</h3>-->
<!--                <p>3566<span>积分</span></p>-->
<!--            </div>-->
<!--        </div>-->

    </div>
    <div id="pagination" class="pagination"></div>
</div>


</body>
<script>
    var pageTotal = 0;   //总页数
    var pageSize = 10;    //一页显示几个
    window.onload = function () {
        InitAjax(1);
    }

    function onLoadPaging() {
        new myPagination({
            id: 'pagination',
            curPage: 1, //初始页码
            pageTotal: pageTotal, //总页数
            pageAmount: pageSize,  //每页多少条
            pageSize: 2, //可选,分页个数

            getPage: function (page) {
                //获取当前页数
                InitAjax(page)
            }
        })
    }

    function InitAjax(pageNum) {
        $.ajax({
            url: "/wechat/forum/mall/GetRecordList",
            type: 'post',
            dataType: 'json',
            data: {
                pagination: "{page:\"" + pageNum + "\",rows:\"" + pageSize + "\",sidx:\"\",sord:\"\"}"
            }, success: function (result) {
                ajaxCallBack(result);
            }

        })
    }

    function ajaxCallBack(data) {
        var insetViewData = ""; //视图数据
        $.each(data.data.rows, function (index, items) {
            insetViewData += "    <div class='jf_list_box_01 clearfix'>\n" +
                "            <div class=\"img_l\">\n" +
                "                <img src=\""+items.headimgurl+"\">\n" +
                "            </div>\n" +
                "            <div class=\"p_r\">\n" +
                "                <p style=\"color: #555\">"+items.nickname+"</p>\n" +
                "                <h3>"+items.name+"</h3>\n" +
                "                <p>"+items.num+"<span>积分</span></p>\n" +
                "            </div>\n" +
                "        </div>";

        });
        $("#liuYan_box").html(insetViewData);
        if (pageTotal == 0) {
            pageTotal = data.data.total;
            onLoadPaging()
        }
    }


</script>
</html>
